grammar HtmlDoc;
options { output=AST; }
tokens {
	DOC='doc';
	TITLE='title';
	SHIT='shit';
}

@header {package hero.antlr;} 
@lexer::header{package hero.antlr;}

html_doc
	: '<html>' html_header html_body '</html>' -> ^('doc' html_header html_body);

html_header
	: '<title>' TEXT '</title>' -> ^('title' TEXT) ;

html_body
	: '<body>' TEXT '</body>' -> ^('shit' TEXT)	;

TEXT : (~('<'))*;

